﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace EOS.EntWebDemo.Models.Leave
{
    public class LeaveView
    {
        public int ID { get; set; }
        public int ApplicantID { get; set; }
        public int ApproverID { get; set; }

        [Display(Name = "请假类型")]
        [Required(ErrorMessage = "必填")]
        public string LeaveType { get; set; }


        [Display(Name = "申请者")]
        [Required(ErrorMessage = "必填")]
        public string ApplicantName { get; set; }

        [Display(Name = "审批者")]
        [Required(ErrorMessage = "必填")]
        public string ApproverName { get; set; }

        [Display(Name = "开始时间")]
        [Required(ErrorMessage = "必填")]
        [DataType(DataType.DateTime)]
        public System.DateTime StartTime { get; set; }

        [Display(Name = "结束时间")]
        [Required(ErrorMessage = "必填")]
        [DataType(DataType.DateTime)]
        public System.DateTime EndTime { get; set; }

        [Display(Name = "请假时间小计")]
        [Required(ErrorMessage = "必填")]
        public long LeaveTime { get; set; }

        [Display(Name = "请假原因")]
        [StringLength(2, MinimumLength = 2, ErrorMessage = "长度不能超过200个字符")]
        [DataType(DataType.MultilineText)]
        public string Reason { get; set; }

        [Display(Name = "审批状态")]
        public string Status { get; set; }
    }
}